﻿using System;
using Borg.AddOn;

namespace Borg
{
    [Serializable]
    internal class SlotBehaviorCollection : BehaviorCollection
    {
        private readonly Slot _slot;

        public SlotBehaviorCollection(INotifierNotificationHook hook, Slot slot) : base(hook)
        {
            _slot = slot;
        }

        protected override void Bind(Behavior behavior)
        {
            behavior.Bind(_slot);
        }

        protected override void Unbind(Behavior behavior)
        {
            behavior.Unbind(_slot);
        }

        protected override Runtime Runtime
        {
            get { return _slot.Runtime; }
        }
    }
}
